package controller;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.GregorianCalendar;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/ServletHelloWorld")
public class ServletHelloWorld extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    public ServletHelloWorld() {
        super();
    }
    public void service (HttpServletRequest request, HttpServletResponse response)
            throws IOException {

            PrintWriter out = response.getWriter();
            GregorianCalendar gc = new GregorianCalendar();
            System.out.println(gc.getTime());
            out.println("<html>");
            out.println("Hello, World!<br>");
            out.println(gc.getTime());
            out.println("</html>");
            out.close();
        }

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	}
}
